import { uniFetch } from './uni-fetch'


// 获取轮播图列表
export function getSwiper(data){
  return uniFetch({
    url:'/carousel/select/show',
    method:'get',
    data,
  })
}

// 获取通证走势
export function getEchartsData(data){
  return uniFetch({
    url:'/tokenTrend/select',
    method:'get',
    data
  })
}
 
// 获取扶农商品列表
export function getFarmerCommodityList(data){
  return uniFetch({
    url:'/farmerCommodity/select',
    method:'get',
    data
  })
}

// 获取展示消息
export function getMsg(data){
  return uniFetch({
    url:'/message/select/enable',
    method:'get',
    data
  })
}

// 获取扶农商品信息
export function goExchangeById(data){
  return uniFetch({
    url:'/token/goExchange',
    method:'get',
    data
  })
}

// 兑换商品
export function exchangeGoods(data){
  return uniFetch({
    url:'/token/exchange',
    method:'post',
    data,
  })
}
//获取通证兑换记录
export function getExchanged(data){
  return uniFetch({
    url:'/token/getExchanged',
    method:'get',
    data,
  })
}
//获取会员消费记录
export function getHistory(data){
  return uniFetch({
    url:'/member/getHistory',
    method:'get',
    data
  })
}
//获取会员消费记录详情
export function getOrderDetails(data){
  return uniFetch({
    url:'/member/getOrderDetails',
    method:'get',
    data
  })
}
//获取通证提现信息
export function getCashInfo(data){
  return uniFetch({
    url:'/member/getCashInfo',
    method:'get',
    data,
  })
}
//通证提现
export function withdraw(data){
  return uniFetch({
    url:'/member/TokenCashOut',
    method:'post',
    data,
  })
}
// 获取提现记录
export const reqWithdrawalRecords = data => uniFetch({url:'/member/cashOut/select',method:'get',data})